home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / batch / batcher.zip / ASK.DOC < prev    next >
Text File  |  1986-07-13  |  1KB  |  45 lines

  1. ASK 
  2.  
  3.  
  4. Purpose:    This command allows the user to set the BATCH
  5.             environment ERRORLEVELS interactively.
  6.  
  7. Format:     ASK [prompt line]
  8.  
  9. Type:       Internal        External
  10.                               ***
  11.  
  12. Remarks:    This command is designed to be used interactively. 
  13.             It allows the user some input into the BATCH 
  14.             environment. The 'prompt line' parameter is 
  15.             optional.
  16.  
  17. Example:    ASK Do you want to go to PAS2? (Y/N)
  18.  
  19.             This command accepts a single character from
  20.             the user and sets ERRORLEVEL based on whether
  21.             Y (or y) or N (or n) was entered. 
  22.  
  23.             Y or y will set ERRORLEVEL to 0
  24.             N or n will set ERRORLEVEL to 1
  25.             Any other answer will cause "Y or N?" to echo
  26.  
  27.             ASK
  28.  
  29.             Displays 'Press Y or N ' on the console and
  30.             waits for a keypress.
  31.  
  32.             (Sample BATCH file)
  33.  
  34.             ASK
  35.             IF ERRORLEVEL 1 GOTO PRESSEDNO
  36.             ECHO You pressed Y or y.
  37.             GOTO end
  38.             :PRESSEDNO
  39.             ECHO You pressed N or n
  40.             :end
  41.  
  42. NOTES:      ASK.COM accepts only Y, y, N, or n as a
  43.             response in this version.  (For more elaborate
  44.             control, see INPUT.COM.)
  45.